package org.common.utils.function;

/**
 * @author zhouzhibing
 * @date 2025/6/18
 */
public interface RunnableThrows extends Runnable {
    static Runnable of(RunnableThrows runnableThrows) {
        return runnableThrows;
    }

    @Override
    default void run() {
        try {
            runImpl();
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
    }

    void runImpl() throws Exception;

}
